package tech.aichan.AiQA.config;

import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder;
import lombok.Data;
import org.springframework.context.annotation.Bean;

/**
 * @author mengyu
 * @date 2024/03/03 12:33
 * 阿里云OSS配置
 */
// TODO 开启配置
//@Configuration
//@ConfigurationProperties(prefix = "aliyun.oss")
@Data
public class OssConfig {
    private String endpoint;
    private String accessKey;
    private String keySecret;
    private String bucketName;

    @Bean
    public OSS ossClient() {
        return new OSSClientBuilder().build(endpoint, accessKey, keySecret);
    }
}
